package com.ruicar.afs.cloud.common.modules.dto.mq.loan.contractdto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.WhetherEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @param
 * @author yk.Li
 * @description 车辆发票申请
 * @date 2020/7/8
 */
@Data
public class ContractCarInvoiceDTO {
    /**
     * 合同号
     */
    @JSONField(name = "contractNo")
    private String contractNo;
    /**
     * 车辆号码
     */
    @JSONField(name = "carId")
    private Long carId;
    /**
     * VIN码
     */
    @JSONField(name = "carVin")
    private String carVin;
    /**
     * 开票单位（出卖方）
     */
    @JSONField(name = "invoiceUnit")
    private String makeInvoiceUnit;
    /**
     * 最低开票价格
     */
    @JSONField(name = "invoiceMinAmt")
    private BigDecimal invoiceMinAmt;
    /**
     * 发票代码
     */
    @JSONField(name = "invoiceCode")
    private String invoiceCode;
    /**
     * 发票号码
     */
    @JSONField(name = "invoiceNo")
    private String invoiceNo;
    /**
     * 开票日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(name = "invoiceDate")
    private Date invoiceDate;
    /**
     * 发票金额
     */
    @JSONField(name = "invoiceAmt")
    private BigDecimal invoiceAmt;
    /**
     * 开票单位性质
     */
    @JSONField(name = "invoiceNature")
    private String invoiceNature;
    /**
     * 出卖方姓名
     */
    @JSONField(name = "saleName")
    private String saleName;
    /**
     * 出卖方身份证号
     */
    @JSONField(name = "saleCertNo")
    private String saleCertNo;
    /**
     * 出卖方身份证有效期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(name = "saleCertEndDate")
    private Date saleCertEndDate;
    /**
     * 是否长期
     */
    @JSONField(name = "isLongTerm", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private WhetherEnum isLongTerm;
    /**
     * 出卖方手机号
     */
    @JSONField(name = "salePhone")
    private String salePhone;
    /**
     * 纳税人识别号
     */
    @JSONField(name = "taxpayerNo")
    private String taxNumber;
    /**
     * 发票税率
     */
    @JSONField(name = "invoiceRate")
    private BigDecimal invoiceRate;

}
